<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>商品类别管理</title>
    <link th:href="@{/local/css/page.css}" rel="stylesheet">
    <link th:href="@{/local/css/goodsList.css}" rel="stylesheet">
<!--    <link th:href="@{/css/viewer.css}" rel="stylesheet">-->
<!--    <link th:href="@{/css/layer.css}" rel="stylesheet">-->

</head>
<body>
<div id="top" th:include="head.html"></div>
<div id="middle">
    <div id="left" th:include="left.html::left"></div>
    <div id="right">
        <form action="/admin/gotoAddCategory">
            <input type="submit" value="添加类别">
        </form>
<!--        <a th:href="categoryAdd.html">添加类别</a>-->
        <div id="msg" th:text="${msg}"></div>
        <table id="dataTable">
            <tr>
                <th>类别ID</th>
                <th>类别名称</th>
                <th>操作</th>
            </tr>

            <tr id="mid" th:each="category:${categoryListPage.list}">
                <td  th:text="${category.getId()}"></td>
                <td  th:text="${category.getName()}" ></td>
                <td>

                    <a href="#" th:onclick="delCategory(this, [[${category.getId()}]] )">删除</a>
                    <a th:href="@{/admin/toEdit/} + ${category.getId()}">编辑</a>
                </td>
            </tr>

        </table>
        <div th:include="page.html::myPage(${categoryListPage},'category')"></div>
    </div>
</div>
<div id="bottom" th:include="bottom.html::bottom"></div>

</body>
<script th:src="@{/js/jquery-3.4.1.slim.min.js}"></script>
<!--<script th:src="@{/js/viewer.js}"></script>-->
<!--<script th:src="@{/js/jquery-viewer.js}"></script>-->
<!--<script th:src="@{/js/layer.js}"></script>-->
<script th:src="@{/local/js/goodsList.js}"></script>
<script th:src="@{/js/axios.min.js}"></script>
<script th:src="@{/local/js/category.js}"></script>

</html>